#ifndef QRUNTIMECHECKDIALOG_H
#define QRUNTIMECHECKDIALOG_H

#include "../../libs/core/qbasedialog.h"
#include <QMap>
#include <QTreeWidgetItem>

namespace Ui {
class QRuntimeCheckDialog;
}

class QMachineValue;

class QRuntimeCheckDialog : public QBaseDialog
{
    Q_OBJECT
    
public:
    explicit QRuntimeCheckDialog(QWidget *parent = 0);
    ~QRuntimeCheckDialog();
    void    show_runtime(QList<QMachineValue*>  list);
    QList<QMachineValue*>   get_runtime();
    int get_ret();
private slots:

    void on_cancel_clicked();

    void on_ok_clicked();

    void on_back_clicked();

    void on_select_all_clicked();

    void item_clicked(QTreeWidgetItem *item);
private:
    Ui::QRuntimeCheckDialog *ui;

    QIcon m_none_icon;
    QIcon m_all_icon;
    QIcon m_some_icon;
    QMap<QTreeWidgetItem*,QMachineValue*>   m_item_to_value;
    QMap<QMachineValue*,QTreeWidgetItem*>   m_value_to_item;

    int m_ret;
};

#endif // QRUNTIMECHECKDIALOG_H
